package com.gqb.dao;

import java.util.List;
import java.util.Map;

import org.hibernate.Criteria;


public interface BaseDao<T> {
	public abstract void delete(int id);
	public abstract void delete(T entity);
	public abstract T getById(int id);
	public abstract List<T> findAll();
	public abstract List<T> findByIds(String[] ids);
	public abstract int save(T entity);
	public abstract void update(T entity);
	public abstract List<T> find(String hql);
	public abstract List<T> find(String hql,Object... values);
	public abstract List<T> query(String hql);
	public abstract List<T> query(String hql,int page,int pageSize);
	public abstract List<T> query(String hql,Object...objects);
	public abstract void saveOrUpdate(T entity);
	public abstract void saveOrUpdateAll(List<T> list);
	public abstract int update(String hql,Object...objects);
	public abstract int update(String hql);
	public abstract int excudeSqlUpdate(String sql,Object...objects);
	public abstract int excudeSql(String sql);
	public abstract List<T> pageQuery(String hql,int page,int pageSize,Object... objects);
	public abstract List<T> createCriteria(int page,int pageSize,Map<String, Object> map);
	public abstract List<T> createCriteria(Map<String, Object> map);
}
